package gold.digger;

import java.util.*;
import java.util.List;

/**
 * Created by fanzhenyu02 on 2020/6/27.
 * common problem solver template.
 */
public class LC1603 {
    public long startExecuteTime = System.currentTimeMillis();


    /**
     * https://leetcode-cn.com/problems/design-parking-system/solution/yi-ti-san-jie-jian-dan-bian-liang-ha-xi-0gs72/
     */
    class ParkingSystem {
        Map<Integer, Integer> map = new HashMap<>();

        public ParkingSystem(int _big, int _medium, int _small) {
            map.put(1, _big);
            map.put(2, _medium);
            map.put(3, _small);
        }

        public boolean addCar(int ct) {
            if (map.get(ct) > 0) {
                map.put(ct, map.get(ct) - 1);
                return true;
            }
            return false;
        }
    }


    public void run() {
        ;
    }

    public static void main(String[] args) throws Exception {
        LC1603 an = new LC1603();
        an.run();

        System.out.println("\ncurrent solution total execute time: " + (System.currentTimeMillis() - an.startExecuteTime) + " ms.");
    }
}
